package com.gtw.modules.api.service.impl;

import com.gtw.modules.api.service.TbSearchInfoService;
import com.gtw.modules.dao.TbSearchInfoDao;
import com.gtw.modules.entity.TbSearchInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service("searchInfoservice")
public class TbSearchInfoServiceImpl implements TbSearchInfoService {
    @Autowired
    private TbSearchInfoDao searchInfoDao;

    @Override
    public TbSearchInfo queryObject(Integer id) {
        return searchInfoDao.queryObject(id);
    }

    @Override
    public List<TbSearchInfo> queryList(Map<String, Object> map) {
        return searchInfoDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return searchInfoDao.queryTotal(map);
    }

    @Override
    @Transactional(rollbackFor=Exception.class)
    public void save(TbSearchInfo searchInfo) {
        searchInfoDao.save(searchInfo);
    }

    @Override
    @Transactional(rollbackFor=Exception.class)
    public void update(TbSearchInfo searchInfo) {
        searchInfoDao.update(searchInfo);
    }

    @Override
    @Transactional(rollbackFor=Exception.class)
    public void delete(Integer id) {
        searchInfoDao.delete(id);
    }

    @Override
    @Transactional(rollbackFor=Exception.class)
    public void deleteBatch(Integer[] ids) {
        searchInfoDao.deleteBatch(ids);
    }

    @Override
    public List<TbSearchInfo> findByKes(String uid) {
        return searchInfoDao.findByKes(uid);
    }

}
